"""
@filename=configs.py
@version=0.1.0.20240328
@author=amnotgcs
@createTime=20240328 22:15
@lastModifiedTime=20240328 22:15
@description=配置文件
"""

import time
from pathlib import Path

from loguru import logger


class Config:
    # 日志配置
    today_yyyymm = time.strftime("%Y%m")
    today_yyyymmdd = time.strftime("%Y%m%d")
    today_hhmmss = time.strftime("%H%M%S")
    log_path_prefix = Path("d:/stemp/tmp/spider/logs")
    log_path = log_path_prefix / today_yyyymm / today_yyyymmdd
    log_path.mkdir(parents=True, exist_ok=True)
    log_filename = log_path / f"{today_hhmmss}.log"
    logger.add(log_filename.as_posix())
